<template>
  <div>
    <el-form :model="compensationDisbursementForm" ref="compensationDisbursementForm">
      <el-form-item label="拨款ID">
        <el-input v-model="compensationDisbursementForm.fundAllocationId"></el-input>
      </el-form-item>
      <el-form-item label="征拆户ID">
        <el-input v-model="compensationDisbursementForm.householdId"></el-input>
      </el-form-item>
      <el-form-item label="发放金额">
        <el-input v-model="compensationDisbursementForm.amount"></el-input>
      </el-form-item>
      <el-form-item label="发放日期">
        <el-date-picker v-model="compensationDisbursementForm.disbursementDate" type="date"></el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="handleSubmit">提交</el-button>
        <el-button @click="handleCancel">取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      compensationDisbursementForm: {
        fundAllocationId: '',
        householdId: '',
        amount: 0.0,
        disbursementDate: ''
      }
    }
  },
  methods: {
    handleSubmit() {
      // 提交表单数据
      this.$http.post('/compensation-disbursement/add', this.compensationDisbursementForm).then(() => {
        this.$router.push('/compensation-disbursement/list');
      });
    },
    handleCancel() {
      // 取消表单操作
      this.$router.push('/compensation-disbursement/list');
    }
  }
}
</script>

<style scoped>

</style>